//
//  BaseButton.m
//  zoneSun
//
//  Created by zy-gyl on 16/7/18.
//  Copyright © 2016年 Zeaple. All rights reserved.
//

#import "BaseButton.h"

@implementation BaseButton

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setCornerRadius];
          [self setTitleColor:DEF_COLOR forState:UIControlStateNormal];
           [self setBackgroundColor:[UIColor blackColor]];
    }
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if(self){
        [self setCornerRadius];
          [self setTitleColor:DEF_COLOR forState:UIControlStateNormal];
           [self setBackgroundColor:[UIColor blackColor]];
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder{
    self = [super initWithCoder:aDecoder];
    if(self){
        [self setCornerRadius];
        [self setTitleColor:DEF_COLOR forState:UIControlStateNormal];
        [self setBackgroundColor:[UIColor blackColor]];
    }
    return self;
}

//设置圆角
- (void)setCornerRadius{
    self.layer.cornerRadius = 20;
    self.layer.masksToBounds = YES;
}
@end
